import {
	Tools
} from 'weaver-mobile';

export const getResourceCard = (params = {}) => Tools.callApi({
	url: '/api/hrm/resource/getResourceCard?operation=getResourceBaseView&cmd=getResourceBaseData',
	method: 'GET',
	params
});

export const getHrmResourceItem = (params = {}) => Tools.callApi({
	url: '/api/hrm/resource/getHrmResourceItem',
	method: 'GET',
	params
});

export const init = (params = {}) => Promise.all([getResourceCard(params), getHrmResourceItem(params)]);

export const queryData = (params = {}) => Tools.callApi({
	url: '/api/public/browser/data/1',
	method: 'GET',
	ismobile: 1,
	params
});

export const getResourceBaseTitle = (params = {}) => Tools.callApi({
	url: '/api/hrm/resource/getResourceBaseTitle',
	method: 'GET',
	ismobile: 1,
	params
});